<div class="row-content am-cf">
	<div class="row">
		<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
			<div class="widget am-cf">
				<div class="widget-head am-cf">
					<div class="widget-title am-fl">通联操作记录</div>
					<div class="widget-function am-fr">
						<a href="javascript:;" class="am-icon-cog"></a>
					</div>
				</div>
				<div class="widget-body am-fr">
					<form class="am-form tpl-form-line-form" id="tonglianRechargeForm" method="post">
						<input type="hidden" id="id" name="id" th:value="${id}" />
						<div class="am-form-group">
							<label for="amount" class="am-u-sm-2 am-form-label">金额:</label>
							<div class="am-u-sm-2 am-u-end">
								<input id="amount" type="number" name="amount" th:value="${recharge.amount}" /> 
							</div>
						</div>
						
						<div class="am-form-group">
							<label for="type" class="am-u-lg-2 am-form-label">类型</label>
							<div class="am-u-sm-10">
								<select id="type"  data-am-selected="{btnWidth: '40%', btnSize: 'sm'}" name="type"  >
									<option th:each="emp : ${inOrOut}" 	th:value="${emp.key}" th:text="${emp.value}" th:selected="${emp.key==recharge.type}"></option>
								</select> 
							</div>
						</div> 
						
						<div class="am-form-group">
							<label for="orderNo" class="am-u-sm-2 am-form-label">单号:</label>
							<div class="am-u-sm-2 am-u-end">
								<input id="orderNo" type="text" name="orderNo" th:value="${recharge.orderNo}" /> 
							</div>
						</div>
						
						<div class="am-form-group">
							<label for="successTime" class="am-u-sm-2 am-form-label">操作时间:</label>
							<div class="am-u-sm-2 am-u-end">
								<input type="text" placeholder="操作时间" id="operateTime" name="operateTime" th:value="${operatorTime}" class="form-datetime-lang am-form-field"/>
							</div>
						</div> 
   					
						<div class="am-form-group">
							<div class="am-u-sm-10 am-u-sm-push-2">
								
								<button type="button" onclick="javascript:$('#tonglianRechargeForm').submit();"
									class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
										<button type="button" onclick="loadPage('tonglian/tonglianRechargeList')"
									class="am-btn am-btn-success tpl-btn-bg-color-success ">返回</button>
							</div>
						</div>
						
					</form>
				</div>
			</div>
		</div>
	</div>

	</div>
	<script th:inline="javascript">
	<![CDATA[
		
	var canSubmit = true;//表单重复提交控制 
	
	$("#type").selected();
	
	$(document).ready(function(){
		
		$('#operateTime').datetimepicker({
			format: 'yyyy-mm-dd hh:ii:ss',
			autoclose: true,
	        todayBtn: true,
			language:  'zh-CN'
		});
		
	});
		

	validateUserForm();
	function validateUserForm(){  
		
		 $('#tonglianRechargeForm').validate({
		        errorElement : 'span',
		        errorClass : 'am-icon-times',
		        focusInvalid : true,
		        onkeyup:false,
		        ignore : "",
		        messages : {
		        	
		        },
		        submitHandler : function(form) {
		        	if(canSubmit){
		        		canSubmit = false;
		        		commit('tonglianRechargeForm', 'tonglian/save','tonglian/tonglianRechargeList');
		        	}
		        	
		        }
		    });

	}
		]]>
	</script>